<!-- 帖子 -->
<link rel="stylesheet" href="/css/afterLoginPage.css">
<div class="main layui-clear">
	<div class="fly-main layui-clear">
		<div class="wrap clearfix">
			<div class="layui-bar">
		    	<div class="layui-breadcrumbs">
		    		<a class="home" href="/"></a>
					<i class="layui-icon">&#xe602;</i>
			  		<a href="/user/center.html?ps=8">帖子</a>
			  		<i class="layui-icon">&#xe602;</i>
			  		<a href="/user/center.html">我的帖子</a>
		    	</div>
		    </div>
		    <#include "/apps/user/userTopInformation.html">
			<div class="home-left ukefu-profile-menu">
				<#include "/apps/user/userinfo.html">
			</div>
			<div class="home-right ukefu-profile" id="commenttopic">
				<div class="content" style="padding-top: 10px;">
					<div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
					  <#include "/apps/user/centermenu.html">
					  <div class="layui-tab-content" style="height: 100px;">
					    <div class="layui-tab-item layui-show">
						    <table class="user-table pc">
						    	<thead>
							    	<tr>
								    	<th width="40%">帖子</th>
								    	<th width="15%">板块</th>
								    	<th width="15%">回复/查看</th>
								    	<th width="20%">最后发帖</th>
							    	</tr>
						    	</thead>
						    	<tbody>
							    	<#if topicList?? && topicList.content??>
							    	<#list topicList.content as topic>
							    	<tr  onclick="window.location.href = '/topic/detail/${topic.id!''}.html'">
								    	<td title="${topic.title!}">${topic.title!}</td>
								    	<td >${topic.blockparent.blockname!''}</td>
								    	<td>${topic.answers!0} / ${topic.views!0}</td>
								    	<td title="${topic.username!} ${topic.createtime?string('yyyy-MM-dd')}">${topic.username!} ${topic.createtime?string('yyyy-MM-dd')} </td>
							    	</tr>
									</#list>
									<#else>
									<tr>
								    	<td colspan="4"><i style="font-size:14px;">没有收藏任何帖子</i></td>
							    	</tr>
									</#if>
						    	</tbody>
						    </table>
						    <ul class="phone-ul">
						    	<#if topicList?? && topicList.content??>
						    	<#list topicList.content as topic>
							    	<li  onclick="window.location.href = '/topic/detail/${topic.id!''}.html'">
								    	<span class="phone-li-title layui-elip"><span class="class">【${topic.block.blockname!''}】</span><a title="${topic.title!}" href="/topic/detail/${topic.id!''}.html">${topic.title!}</a></span>
								    	<div class="phone-li-bottm">
								    		<span class>${topic.createtime?string('yyyy-MM-dd HH:mm')} </span>
								    		<div>
								    			<span>回复  ${topic.answers!0} &nbsp;&nbsp;&nbsp;&nbsp;</span>
								    			<span>浏览  ${topic.views!0}</span>
								    		</div>
								    	</div>
							    	</li>
								</#list>
								</#if>
						    </ul>
						</div>
					    
					  </div>
					</div> 
				</div>
				<div style="text-align: center" class="front-desk">
			        <div class="laypage-main" id="topicpages"></div>
			    </div>
			</div>
			
		</div>
	</div>
</div>
<script>
var anlist = [];
<#list topicList.content as list>
anlist.push({"id":"${list.id!''}","title":"${list.title!''}","name":"${list.name!''}","price":"${list.price!''}","gradedescribe":"${list.gradedescribe!''}","username":"${list.username!''}","starlevel":"${list.starlevel!''}","describecontent":"${list.describecontent!''}","commenttime":"${list.commenttime!''}","fag":"${list.fag!''}"});
</#list>
console.log("推荐案例：anlist==》",anlist);
	layui.use(['element','laypage'], function(){
		  var element = layui.element();
		  
		  var laypage = layui.laypage;
		  laypage({
			    cont: 'topicpages'
			    ,first:'首页'
			    ,last:'末页'
			    ,pages: ${topicList.totalPages}
			    ,curr:${topicList.number+1}
			    ,skin: '#32c24d'
			    ,skip: true
			    ,jump:function(obj, first){
			    	var curr = obj.curr;
			    	if(!first){
			    		location.href = '/user/center.html?ps=8&p='+curr+"<#if RequestParameters['q']?? && RequestParameters['q'] != ''>&q=${RequestParameters['q']}</#if>";
			    	}
			    }
		});
	}); 
</script>